-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add assigned card tile and display expensify cards #26862
Feature/add assigned card tile and display expensify cards #26862
Conversation
cc @grgia |
2dd6819
to
b621364
Compare
@ Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
fb341ca
to
8b305e9
Compare
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Section from '../../../components/Section'; | ||
|
||
const propTypes = { | ||
icon: PropTypes.func.isRequired, | ||
children: PropTypes.node.isRequired, | ||
subtitle: PropTypes.string.isRequired, | ||
title: PropTypes.string.isRequired, | ||
}; | ||
|
||
function WalletSection({icon, children, subtitle, title}) { | ||
return ( | ||
<Section | ||
icon={icon} | ||
subtitle={subtitle} | ||
title={title} | ||
> | ||
{children} | ||
</Section> | ||
); | ||
} | ||
|
||
WalletSection.displayName = 'WalletSection'; | ||
WalletSection.propTypes = propTypes; | ||
|
||
export default WalletSection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component seems redundant, do we really need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, it was Pedro's decision to add it, maybe let's wait until tomorrow, so he can share his opinion on that, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thiagobrez
It was requested on the technical document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this being used in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1d1c173
to
6364c79
Compare
@grgia Is there anything else missing in this PR? |
22050b2
to
f7525a9
Compare
I think we should expand on the tests section for this PR. I can help you write tests but we should cover all cases in the doc |
Ok, could you provide those test scenarios then? 😄 I'm not aware of the whole context |
@pac-guerreiro please complete author checklist |
@pac-guerreiro it looks like a unrelated unit test is failing, could you also merge main again and fix lint errors? |
Assigning @thesahindia for C+ review from issue |
Looks like some docs were renamed here too @pac-guerreiro |
@pac-guerreiro let's merge main and fix the lint errors please! Let's get this PR ready for C+ review 😁🚀 cc @thesahindia |
Taking the review over from @thesahindia! |
c02f513
to
7c7fda0
Compare
7c7fda0
to
59aae97
Compare
Reviewer Checklist
Screenshots/Videos |
@@ -1243,6 +1243,7 @@ const CONST = { | |||
CLOSED: 6, | |||
STATE_SUSPENDED: 7, | |||
}, | |||
ACTIVE_STATES: [2, 3, 4, 7], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STATE: {
OPEN: 3,
NOT_ACTIVATED: 4,
STATE_DEACTIVATED: 5,
CLOSED: 6,
STATE_SUSPENDED: 7,
},
What is state 2
in Active_States? it's not in the State
object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it's the Card Not Issued
state. I think this is a typo from the design doc. Let's Remove 2 @pac-guerreiro.
But also I'd consider this as NAB for now considering the priority of this PR
Edit: it's also present on @pac-guerreiro bug: console error on native. Steps:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grgia LGTM
@rushatgabhane I had completed the checklist already 😄 |
I've created an issue for the State here - |
Also, there is another console error as well that needs confirmation from @pac-guerreiro! |
@allroundexperts I confirmed that was due to incorrect onyx merge data |
Gotcha. Then this is good to merge! |
@allroundexperts I just wanted to get more eyes on this because we need to merge this to unblock some issues |
@allroundexperts @rushatgabhane @pac-guerreiro Great work on this everyone! Thank you all so much for your help |
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.85-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
🚀 Deployed to staging by https://github.com/grgia in version: 1.3.86-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
@@ -252,12 +286,13 @@ function PaymentMethodList({ | |||
iconWidth={item.iconSize} | |||
badgeText={shouldShowDefaultBadge(filteredPaymentMethods, item.isDefault) ? translate('paymentMethodList.defaultPaymentMethod') : null} | |||
wrapperStyle={styles.paymentMethod} | |||
shouldShowRightIcon={shouldShowAssignedCards} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from #38643, this PaymentMethodList
is also used in Transfer account screen, in that screen, we don't show the right icon by original design
Details
This PR adds assigned card tile with expensify card list to the wallet page.
Docs: https://docs.google.com/document/d/1rFxJ78vz5On6zSWzYa51B9v-tyLdC5pUsBeLOLig0t4/edit#bookmark=id.39u16xejrb8c
Fixed Issues
$ #22872
PROPOSAL:
Tests
getComponent
forSCREENS.SETTINGS.WALLET
, inSettingsModalStackNavigator
to import the component from../../../pages/settings/Wallet/WalletPage/WalletPage
cardList
with mock data:Offline tests
NA
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android